package com.example.shop_front_api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
@TableName("shop_carts")
public class Cart {
    @TableId(type = IdType.AUTO)
    private Long id;

    @JsonProperty("member_id")
    private Integer memberId;

    @TableField("goods_id")
    @JsonProperty("product_id")
    private Integer productId;

    private Integer quantity;

    @JsonProperty("pay_price")
    private Double payPrice;

    private Integer selected;

    @JsonProperty("created_time")
    private Integer createdTime;

    @TableField(exist = false)
    private String productName;

    @TableField(exist = false)
    private String productImage;
}